package com.rightsidetech.user.mapper;

import com.rightsidetech.user.dtos.response.UsLoginNameResp;
import com.rightsidetech.user.entity.UsUserLoginInfo;
import org.apache.ibatis.annotations.Param;

public interface UsUserLoginInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UsUserLoginInfo record);

    int insertSelective(UsUserLoginInfo record);

    UsUserLoginInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UsUserLoginInfo record);

    int updateByPrimaryKey(UsUserLoginInfo record);

    UsUserLoginInfo selectByUserInfoId(@Param("userInfoId") Long userInfoId);

    int addBlacklist(@Param("userInfoId")Long userInfoId,@Param("status") Byte status);

    int updateTokenByLoginInfoId(@Param("loginInfoId") Long loginInfoId, @Param("token") String token);

    int updateLoginOutTokenByLoginInfoId(@Param("loginInfoId") Long loginInfoId, @Param("token") String token);

    UsUserLoginInfo selectByLoginName(@Param("phoneNumber") String phoneNumber);

    UsUserLoginInfo findByToken(@Param("tokenApp") String tokenApp);

    UsLoginNameResp selectName(Long id);

    String findPhoneById(@Param("loginId") Long loginId);
}